import * as React from 'react';
import { Icon, Button } from 'antd';
import MForm from '../../../component/form/MForm';

import '../../../component/form/MForm.scss';

export default class CustomerDetailStep extends MForm {

  constructor(props: any) {
    super(props);
  }

  goBack = () => {
    this.props.onClose();
  }

  viewInfo = () => {
    this.props.onSubmit();
  }


  renderUI() {
    const style = {
      display: this.props.show === false ? 'none' : 'block'
    }
    return (
      <div style={style} className='form-result-panel flex-row flex-middle flex-center'>
        <div className='form-success'>
          <p className='form-success_text'><Icon type='check' />&nbsp;&nbsp;&nbsp;&nbsp;操作完成</p>
          <Button type='ghost' onClick={this.goBack}><Icon type='rollback'></Icon>返回顾客列表</Button>
          <Button type='primary' onClick={this.viewInfo}><Icon type='eye'></Icon>查看顾客信息</Button>
        </div>
      </div>
    );
  }
}
